import Mock from 'mockjs';
import { MockMethod } from 'vite-plugin-mock';

export default [
  {
    url: '/api/getUserList',
    method: 'get',
    response: () => ({
      code: 200,
      msg:"用户请求失败",
      data: {
        ...Mock.mock({
          'list|10': [
            {
              index: /S20201228115950[0-9][0-9][0-9]/,
              pdName: '@cname',
              'purchaseNum|1-100': 100,
              adminName: '财务部',
              updateTime: '2020-05-20@date("HH:mm:ss")',
            },
          ],
        }),
      },
    }),
  },
  {
    url: '/api/getUserInfo',
    method: 'post',
    response: () => ({
      code: 200,
      message:"用户接口请求成功",
      data: {
        ...Mock.mock({
          'list|10': [
            {
              index: /S20201228115950[0-9][0-9][0-9]/,
              pdName: '@cname',
              'purchaseNum|1-100': 100,
              adminName: '财务部',
              updateTime: '2020-05-20@date("HH:mm:ss")',
            },
          ],
        }),
      },
    }),
  },
 
] as MockMethod[];
